package ua.khpi.si.kit49.diploma.db.dao;

import java.util.List;

import ua.khpi.si.kit49.diploma.db.dto.User;

/**
 * Interface user DAO
 * 
 * @author netstalk3r
 * 
 */
public interface UserDAO {

	/**
	 * method for getting user by id
	 * 
	 * @param Id
	 *            for getting user
	 * @return user with current id
	 */
	User getUserById(Integer id);

	/**
	 * method for getting user by email
	 * 
	 * @param email
	 *            for getting user
	 * @return user with current email
	 */
	User getUserByEmail(String email);

	/**
	 * method for getting user by login
	 * 
	 * @param username
	 *            for getting user
	 * @return user with current login
	 */
	User getUserByUsername(String username);

	/**
	 * method for getting all users
	 * 
	 * @return list with all users
	 */
	List<User> getAllUsers();

	/**
	 * method for save or update user
	 * 
	 * @param user
	 *            user for save or update
	 */
	void saveOrUpdateUser(User user);

	/**
	 * method for removing users
	 * 
	 * @param users
	 *            list with users id to remove
	 */
	void removeUsers(List<Integer> ids);
	
	/**
	 * method for ban users
	 * 	
	 * @param ids list with user ids
	 * @param enabled determine what to do, ban or unban
	 */
	void banUsers(List<Integer> ids, Boolean enabled);
}
